const router = require('koa-router')()
const utils = require('../utils/utils')
const echarts = require('../model/echartSchema')
router.prefix('/echarts')

//用户列表渲染
router.get('/list', async (ctx) => {
  try {
    let result = await echarts.find()
    ctx.body = utils.success(result)
  } catch (error) {
    ctx.body = utils.fail(error.stack)
  }
})


module.exports = router
